<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 11] Serializable</TITLE>
<META NAME="author" CONTENT="Mark Grand and Jonathan Knudsen">
<META NAME="date" CONTENT="Fri Aug  8 16:41:47 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Java Fundamental Classes Reference">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java Fundamental Classes Reference" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch11_58.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 11<br>The java.io Package</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch11_60.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=refnamediv>
<H1>Serializable</H1>

<H2>Name</H2>

Serializable

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch11-REFSECT1-AUTOID.406">Synopsis</A></h2>

<DL CLASS=variablelist>
<DT CLASS=varlistentry>Interface Name:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.io.Serializable</tt>

<p>
<DT CLASS=varlistentry>Super-interface:<br>
<DD>

<P CLASS=para>
None

<p>
<DT CLASS=varlistentry>Immediate Sub-interfaces:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.io.Externalizable</tt>

<p>
<DT CLASS=varlistentry>Implemented By:<br>
<DD>

<P CLASS=para>
<tt CLASS=literal>java.awt.BorderLayout</tt>, 
<tt CLASS=literal>java.awt.CardLayout</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.CheckboxGroup</tt>, 
<tt CLASS=literal>java.awt.Color</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.Component</tt>, 
<tt CLASS=literal>java.awt.Cursor</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.Dimension</tt>, 
<tt CLASS=literal>java.awt.Event</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.FlowLayout</tt>, 
<tt CLASS=literal>java.awt.Font</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.FontMetrics</tt>, 
<tt CLASS=literal>java.awt.GridBagConstraints</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.GridBagLayout</tt>, 
<tt CLASS=literal>java.awt.GridLayout</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.Insets</tt>, 
<tt CLASS=literal>java.awt.MediaTracker</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.MenuComponent</tt>, 
<tt CLASS=literal>java.awt.MenuShortcut</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.Point</tt>, 
<tt CLASS=literal>java.awt.Polygon</tt>,

<P CLASS=para>
<tt CLASS=literal>java.awt.Rectangle</tt>, 
<tt CLASS=literal>java.awt.SystemColor</tt>,

<P CLASS=para>
<tt CLASS=literal>java.io.File</tt>, 
<tt CLASS=literal>java.io.ObjectStreamClass</tt>,

<P CLASS=para>
<tt CLASS=literal>java.lang.Boolean</tt>, 
<tt CLASS=literal>java.lang.Character</tt>,

<P CLASS=para>
<tt CLASS=literal>java.lang.Class</tt>, 
<tt CLASS=literal>java.lang.Number</tt>,

<P CLASS=para>
<tt CLASS=literal>java.lang.String</tt>, 
<tt CLASS=literal>java.lang.StringBuffer</tt>,

<P CLASS=para>
<tt CLASS=literal>java.lang.Throwable</tt>,
<tt CLASS=literal>java.net.InetAddress</tt>,

<P CLASS=para>
<tt CLASS=literal>java.net.URL</tt>, 
<tt CLASS=literal>java.text.BreakIterator</tt>,

<P CLASS=para>
<tt CLASS=literal>java.text.Collator</tt>, 
<tt CLASS=literal>java.text.DateFormatSymbols</tt>,

<P CLASS=para>
<tt CLASS=literal>java.text.DecimalFormatSymbols</tt>, 
<tt CLASS=literal>java.text.Format</tt>,

<P CLASS=para>
<tt CLASS=literal>java.util.BitSet</tt>, 
<tt CLASS=literal>java.util.Calendar</tt>,

<P CLASS=para>
<tt CLASS=literal>java.util.Date</tt>, 
<tt CLASS=literal>java.util.EventObject</tt>, 

<P CLASS=para>
<tt CLASS=literal>java.util.Hashtable</tt>, 
<tt CLASS=literal>java.util.Locale</tt>,

<P CLASS=para>
<tt CLASS=literal>java.util.Random</tt>, 
<tt CLASS=literal>java.util.TimeZone</tt>,

<P CLASS=para>
<tt CLASS=literal>java.util.Vector</tt>

<p>
<DT CLASS=varlistentry>Availability:<br>
<DD>

<P CLASS=para>
New as of JDK 1.1 </DL>
</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch11-REFSECT1-AUTOID.407">Description</A></h2>

<P CLASS=para>
The <tt CLASS=literal>Serializable</tt> interface 
is implemented by classes that allow object instances to be serialized 
and deserialized. A class uses the default serialization mechanism simply 
by implementing this interface. A class that wants finer control over serialization 
and deserialization should implement the following methods (with these 
exact signatures): 

<DIV CLASS=screen>
<P>
<PRE>
private void readObject(ObjectInputStream in) 
             throws IOException, ClassNotFoundException; 
private void writeObject(ObjectOutputStream out) throws IOException;
</PRE>
</DIV>

<P CLASS=para>
The <tt CLASS=literal>ObjectOutputStream</tt> and 
<tt CLASS=literal>ObjectInputStream</tt> classes support 
serialization and deserialization, respectively. 

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch11-REFSECT1-AUTOID.408">Interface Declaration</A></h2>

<DIV CLASS=screen>
<P>
<PRE>
public abstract interface java.io.Serializable {
}
</PRE>
</DIV>

</DIV>

<DIV CLASS=refsect1>
<h2 CLASS=refsect1><A CLASS="TITLE" NAME="ch11-REFSECT1-AUTOID.409">See Also</A></h2>

<P CLASS=para>
<tt CLASS=literal>BitSet</tt>, 
<tt CLASS=literal>Boolean</tt>, 
<tt CLASS=literal>BreakIterator</tt>, 
<tt CLASS=literal>Calendar</tt>, 
<tt CLASS=literal>Character</tt>, 
<tt CLASS=literal>Class</tt>, 
<tt CLASS=literal>Collator</tt>, 
<tt CLASS=literal>Date</tt>, 
<tt CLASS=literal>DateFormatSymbols</tt>, 
<tt CLASS=literal>DecimalFormatSymbols</tt>, 
<tt CLASS=literal>EventObject</tt>, 
<tt CLASS=literal>Externalizable</tt>, 
<tt CLASS=literal>File</tt>, 
<tt CLASS=literal>Format</tt>, 
<tt CLASS=literal>Hashtable</tt>, 
<tt CLASS=literal>InetAddress</tt>, 
<tt CLASS=literal>Locale</tt>, 
<tt CLASS=literal>Number</tt>, 
<tt CLASS=literal>ObjectInputStream</tt>, 
<tt CLASS=literal>ObjectOutputStream</tt>, 
<tt CLASS=literal>ObjectStreamClass</tt>, 
<tt CLASS=literal>Random</tt>, 
<tt CLASS=literal>String</tt>, 
<tt CLASS=literal>StringBuffer</tt>, 
<tt CLASS=literal>Throwable</tt>, 
<tt CLASS=literal>TimeZone</tt>, 
<tt CLASS=literal>URL</tt>, 
<tt CLASS=literal>Vector</tt> 
</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch11_58.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch11_60.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>SequenceInputStream</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>StreamCorruptedException</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
